import React from 'react';
import { createRoot, hydrateRoot } from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import './global.less';
import Router from './Router';

const dom = document.getElementById('root');
if (dom) {
  const root = createRoot(dom);
  // root.render(React.createElement(RouterProvider, {router:createBrowserRouter(router)}));
  root.render(React.createElement(BrowserRouter, {},React.createElement(Router)));


  // hydrateRoot(dom, React.createElement(BrowserRouter, {}, React.createElement(Router)));
}
